package open.algo.graph;

import java.util.ArrayList;
import java.util.List;

import open.algo.graph.AStar.Node;

public class DumpNode implements Node
{
    int number;
    List<Node> neighbor = new ArrayList<Node>();

    public DumpNode(int number)
    {
        this.number = number;
    }

    @Override
    public boolean equals(Object obj)
    {
        if (obj == null || !(obj instanceof DumpNode))
            return false;
        if (obj == this)
            return true;
        return number == ((DumpNode) obj).number;
    }

    @Override
    public int hashCode()
    {
        return number;
    }

    @Override
    public List<Node> getNeighbor()
    {
        return neighbor;
    }

    public void setNeighbor(List<Node> neighbor)
    {
        this.neighbor = neighbor;
    }

    @Override
    public int path_cost_neighbor(Node neighbor)
    {
        return 1;
    }

    @Override
    public int heuristic_cost(Node target)
    {
        return 0;
    }

    @Override
    public String toString()
    {
        return number + "";
    }
}
